package com.shujia.day15.ketang;

import java.io.File;

/*
    判断功能
        public boolean isDirectory()
        public boolean isFile()
        public boolean exists()
        public boolean canRead()
        public boolean canWrite()
        public boolean isHidden()

 */
public class FileDemo3 {
    public static void main(String[] args) {
        File file = new File("java/src/com/shujia/day15/ketang/李刚.txt");

        // public boolean isDirectory()
        System.out.println(file.isDirectory());

        //public boolean isFile()
        System.out.println(file.isFile());

        //public boolean exists()
        System.out.println(file.exists());

        //public boolean canRead() 是否可读
        System.out.println(file.canRead());

        //public boolean canWrite() 是否可写
        System.out.println(file.canWrite());

        //public boolean isHidden() 是否被隐藏
        System.out.println(file.isHidden());
    }
}
